package hrm.action.factory;

import hrm.action.Action;
import hrm.action.ActionFactory;
import hrm.action.login.BeforeInsertLogin;
import hrm.action.login.BeforeListLogin;
import hrm.action.login.DeleteLogin;
import hrm.action.login.IndexAction;
import hrm.action.login.InsertLogin;
import hrm.action.login.ListLogin;
import hrm.action.login.LoginAction;
import hrm.action.login.LogoutAction;
import hrm.action.login.UpdateLogin;



public class LoginActionFactory implements ActionFactory {
	private static LoginActionFactory factory;
	
	public static LoginActionFactory getInstance(){
		if(factory==null){
			factory=new LoginActionFactory();
		}
		return factory;
	}

	public Action getAction(String command){
		Action action=null;
		if(command.equalsIgnoreCase("login")){
			action=new LoginAction();
		}else if(command.equalsIgnoreCase("index")) {
			action=new IndexAction();
		}else if(command.equalsIgnoreCase("bfListLogin")){
			action=new BeforeListLogin();
		}else if(command.equalsIgnoreCase("listLogin")){
			action=new ListLogin();
		}else if(command.equalsIgnoreCase("bfInsertLogin")){
			action=new BeforeInsertLogin();
		}else if(command.equalsIgnoreCase("insertLogin")){
			action=new InsertLogin();
		}else if(command.equalsIgnoreCase("updateLogin")){
			action=new UpdateLogin();
		}else if(command.equalsIgnoreCase("deleteLogin")){
			action=new DeleteLogin();
		}else if(command.equalsIgnoreCase("logout")){
			action=new LogoutAction();
		}
		return action;
	}//
}
